package tako.wisers.com.android.apis.activity;

import tako.wisers.com.android.apis.R;
import tako.wisers.com.android.apis.http.ConfLoadService;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.telephony.TelephonyManager;

public class LoadingActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.loading_page);
		TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
		String USER_AGENT = tm.getLine1Number();

		ensureDownloaded(getString(R.string.app_name), USER_AGENT, this);
	}

	private static boolean ensureDownloaded(String appName, String tel,
			Activity activity) {
		ConfLoadService loadService = new ConfLoadService(appName, tel, activity);
		loadService.loadConf();
		return false;
	}
}
